<?php
/**
 * Created by PhpStorm.
 * User: lhl
 * Date: 2020/11/30
 * Time: 9:49
 * Features: 学习数据
 */

namespace app\adminapiv3\model\learn_data;


class HostLearnDataModel extends LearnDataBaseModel
{
    /**
     *  根据主机id和批次号,查询该主机某个批次的学习id数据
     *  @param int $hostId          主机id
     *  @param int $learnNumber     批次号
     */
    public function getLearnIdByHostIdAndBatchNo($hostId,$learnNumber){
        //设置表名
        $this->setHostId($hostId);
        return $this->where([
            'learn_number' => $learnNumber
        ])->column('id');
    }
}